import {request} from '@/utils/request'

export async function getPermissions(data){
  return request('api/permissions','get',data)
}

export async function delPermission(id){
    return request(`api/permission/${id}`,'delete')
}

export async function updataPermission(data){
    return request(`api/permission/${data.id}`,'put',data)
}

export async function addPermission(data){
    return request(`api/permission`,'post',data)
}

export default {
    getPermissions,
    delPermission,
    updataPermission,
    addPermission
}
